package com.apartment.own.domain.enums;

import com.apartment.common.utils.StringUtils;
import com.baomidou.mybatisplus.annotation.IEnum;

import java.io.Serializable;

/**
 * @Description:出租类型
 * @Author: @Dog_E
 * @Date: 2020/9/14 0014 15:15
 **/
public enum LeaseModeEnum implements IEnum {

    /**
     *
     */
    ALL(2,"全部",0),
    /**
     *
     */
    ENTIRE(0, "整租",1),
    /**
     *
     */
    PARTED(1, "合租",1);

    private Integer id;
    private String name;
    private Integer select;

    LeaseModeEnum(Integer id, String name,Integer select) {
        this.id = id;
        this.name = name;
        this.select=select;
    }


    public static LeaseModeEnum getEnum(int id ) {
        for (LeaseModeEnum enums : LeaseModeEnum.values()) {
            if (enums.getValue().equals(id) ) {
                return enums;
            }
        }
        return null;
    }


    public Integer getSelect() {
        return select;
    }

    public void setSelect(Integer select) {
        this.select = select;
    }

    @Override
    public Serializable getValue() {
        return this.id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

